<?php
  require_once("dailymile.class.php");
  $d = new DailyMile("samstarling");
  $last = $d->getLastRun();
  $week = $d->getWeekTotal();
  $total = $d->getTotal();
?>

<html>
  <head>
    <title>DailyMile Example</title>
  </head>
  <body>
    
    <h1>DailyMile Example</h1>
    <p>This is an example of every variable that can be shown.</p>
    
    <hr/>
    
    <p>
      My last run was <b><?php echo $last['timeago']; ?></b> and took <b><?php echo $last['duration']; ?></b>. I ran 
      <b><?php echo $last['distance']; ?> <?php echo $last['units']; ?></b>, giving an average pace of 
      <?php echo $last['pace']; ?>. The description I gave was <i>"<?php echo $last['description']; ?>"</i>.
    </p>
    
    <p>
      I have run <b><?php echo $week['distance']; ?> <?php echo $week['units']; ?></b> in the past week, and 
      <b><?php echo $total['distance']; ?> <?php echo $total['units']; ?></b> in total.
    </p>
    
  </body>
</html>